import React, { Component } from 'react'

export class Sun extends Component {
  render() {
      const {list,deletes}=this.props;
  
    return (
      <div>
           {
            list.length?
            list.map((item,index)=>{
              return <li key={index}>
                {item}
                <span onClick={ ()=>{this.props.deletes()}}>删除</span>
              </li>
            }):'暂无数据'
          }
      </div>
    )
  }
}

export default Sun